import axios from '../utils/reqirest'
// 用户获取
export const list = (data)=>{
    return axios({
        url:'/users/userList',
        method:'get',
        data:data
    })
}
// 用户添加
export const addlist = (data)=>{
    return axios({
        url:'/users/regin',
        method:'post',
        data:data
    })
}
//用户删除
export const dele = (data)=>{
    return axios({
        url:'/users/userDel/'+data.id,
        method:'delete',
    })
}
// 所在部门下拉
export const sele = (data)=>{
    return axios({
        url:'/dept',
        method:'get',
        data:data
    })
}
// 用户编辑
export const elmit = (data)=>{
    return axios({
        url:'/users/UserEdit',
        method:'post',
        data:data
    })
}


// 部门管理

// 获取部门列表
export const depentlist=(val)=>{
    return axios({
        url:'/dept',
        method:'get',
        data:val
    })
}
// 部门添加
export const addDert=(val)=>{
    return axios({
        url:'/dept/deptAdd',
        method:'post',
        data:val
    })
}
// 部门编辑
export const editDert=(val)=>{
    return axios({
        url:'/dept/deptEdit',
        method:'post',
        data:val
    })
}
// 部门成员
export const cheng =(val)=>{
    return axios({
        url:'/users/deptPeople',
        method:'get',
        data:val
    })
} 
